package org.example.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class TopicListener {
    @RabbitListener(queues = "topic.queue1")
    public void Queue1(String msg){
        System.out.println("一号拿到了"+msg);
    }
    @RabbitListener(queues = "topic.queue2")
    public void Queue2(String msg){
        System.out.println("二号拿到了"+msg);
    }
}
